package com.lanyou.esb.web.param;

import org.apache.commons.lang3.StringUtils;

/**
 * 服务告警查询参数
 * 
 * @author Davey.wu
 */
public class ServiceAlarmManagementParam {
	/** 是否为第一次 **/
	private boolean isFirst;
	/** 领域标识 **/
	private String fieldId;
	/** 系统标识 **/
	private String systemId;
	/** 告警类型 **/
	private String alarmType;
	/** 是否是今天 **/
	private boolean today;
	/** 是否是七天内 **/
	private boolean sevenBeforeDate;
	/** 开始时间 **/
	private String startDateTime;
	/** 结束时间 **/
	private String endDateTime;
	/** 是否隔离 **/
	private String isolation;

	public boolean isToday() {
		return today;
	}

	public void setToday(boolean today) {
		this.today = today;
	}

	public boolean isSevenBeforeDate() {
		return sevenBeforeDate;
	}

	public void setSevenBeforeDate(boolean sevenBeforeDate) {
		this.sevenBeforeDate = sevenBeforeDate;
	}

	public String getFieldId() {
		return fieldId == null ? "" : fieldId;
	}

	public void setFieldId(String fieldId) {
		this.fieldId = fieldId;
	}

	public String getSystemId() {
		return systemId == null ? "" : systemId;
	}

	public void setSystemId(String systemId) {
		this.systemId = systemId;
	}

	public boolean isFirst() {
		return isFirst;
	}

	public void setFirst(boolean isFirst) {
		this.isFirst = isFirst;
	}

	public String getStartDateTime() {
		return startDateTime == null ? "" : startDateTime;
	}

	public void setStartDateTime(String startDateTime) {
		this.startDateTime = startDateTime;
	}

	public String getEndDateTime() {
		return endDateTime == null ? "" : endDateTime;
	}

	public void setEndDateTime(String endDateTime) {
		this.endDateTime = endDateTime;
	}

	public boolean haveCondiction() {
		if (StringUtils.isNotBlank(fieldId) || StringUtils.isNotBlank(systemId)
				|| today || sevenBeforeDate
				|| StringUtils.isNotBlank(startDateTime)
				|| StringUtils.isNotBlank(endDateTime)) {
			return true;
		}
		return false;
	}

	public String getIsolation() {
		return isolation == null ? "" : isolation;
	}

	public void setIsolation(String isolation) {
		this.isolation = isolation;
	}

	public String getAlarmType() {
		return alarmType == null ? "" : alarmType;
	}

	public void setAlarmType(String alarmType) {
		this.alarmType = alarmType;
	}
}
